/**
 * @author liangxi
 * @since 2023/12/21
 */

#ifndef DESIGNPATTERN_SOY_H
#define DESIGNPATTERN_SOY_H

#include <memory>
#include "../Beverage.h"
#include "../CondimentDecorator.h"

namespace Decorator {

    class Soy : public CondimentDecorator {
    public:
        explicit Soy(const std::shared_ptr<Beverage> &b) : beverage(b) {}

        double cost() override {
            return 0.15 + beverage->cost();
        }

        [[nodiscard]] const std::string getDescription() const override {
            return this->beverage->getDescription() + ",Soy";
        }

    private:
        std::shared_ptr<Beverage> beverage;
    };

} // Decorator

#endif //DESIGNPATTERN_SOY_H
